dgb(phase-b): get_height_and_last endpoint window SSOT + KAT - #414
Merged
Conversation
frstrtr
force-pushed
the
dgb/ghal-endpoints-ssot
branch
from
June 24, 2026 09:34
09dab20 to
1c8e8b0
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
force-pushed
the
dgb/ghal-endpoints-ssot
branch
from
June 24, 2026 10:20
1c8e8b0 to
f4d3ee8
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
force-pushed
the
dgb/ghal-endpoints-ssot
branch
from
June 24, 2026 14:45
f4d3ee8 to
f3a67ae
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
force-pushed
the
dgb/ghal-endpoints-ssot
branch
from
June 24, 2026 15:51
f3a67ae to
20b3a87
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
Lift the pure integer window arithmetic that every consumer of forest.get_height_and_last() applies to the resolved (height, last) pair into a fenced header-only SSOT, coin/get_height_and_last_endpoints.hpp: - rooted-tail invariant = height >= REAL_CHAIN_LENGTH or last is None - verify entry guard = height >= CHAIN_LENGTH+1 or last is None - PPLNS window depth = min(height, REAL_CHAIN_LENGTH) - PPLNS window activation = depth >= 1 - PPLNS max shares = max(0, min(height, REAL_CHAIN_LENGTH) - 1) - monitor diagnostic gate = height >= 10 vs the p2pool-dgb-scrypt oracle: util/forest.py:171-173 (get_height_and_last -> delta.height, delta.tail), data.py:160-161 (generate_transaction rooted-tail assert), data.py:695-696 (attempt_verify rooted-tail raise), networks/digibyte.py REAL_CHAIN_LENGTH = 12*60*60//15 = 2880. The get_delta_to_last skip-list walk stays in the forest; this slice lifts only the integer guards over the already-resolved pair, with a non-circular KAT (7/7) that re-derives every expectation from the oracle min/clamp identities and DGB net constants, including a full 0..2*CHAIN_LENGTH consistency sweep. FENCED, additive: redistribute.hpp / pool_monitor.hpp / share_check.hpp NOT rewired (byte-identity delegation is the follow-on). Per-coin isolation: src/impl/dgb/ only. Test in both build.yml --target arms + dir CMakeLists.txt.
frstrtr
force-pushed
the
dgb/ghal-endpoints-ssot
branch
from
June 24, 2026 19:18
20b3a87 to
fda3bcb
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
added a commit
that referenced
this pull request
Jun 24, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
…t SSOT Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto the get_height_and_last_endpoints.hpp SSOT (PR #414): depth = std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...) if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return; Byte-identical: pplns_window_depth is std::min and pplns_window_active is depth>=1, so !active == depth<1. No reward-distribution value change. Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline std::min/(depth<1) directly (non-circular) and asserts the SSOT call reproduces it across a height matrix straddling negative/0/1/RCL+-1, both nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only. Target in CMake + both build.yml allowlist arms.
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
dgb: delegate redistribute PPLNS-window guard onto get_height_and_last SSOT (#414 follow-on)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DGB Phase-B — get_height_and_last endpoint window SSOT + KAT
Fenced, additive Phase-B pillar (follow-on to #411 tail-score endpoints). Lifts the pure integer window arithmetic that every consumer of
forest.get_height_and_last()applies to the resolved(height, last)pair into a header-only SSOT:src/impl/dgb/coin/get_height_and_last_endpoints.hpp.Lifted guards (oracle-anchored):
height >= REAL_CHAIN_LENGTH or last is None(data.py:160-161)height >= CHAIN_LENGTH+1 or last is None(data.py:695-696)min(height, REAL_CHAIN_LENGTH)(redistribute.hpp:453)depth >= 1(redistribute.hpp:454)max(0, min(height, REAL_CHAIN_LENGTH) - 1)(pplns_weight_walk.hpp:96)height >= 10(pool_monitor.hpp:98)Oracle anchor: p2pool-dgb-scrypt
util/forest.py:171-173(get_height_and_last -> delta.height, delta.tail),data.py:160-161,data.py:695-696,networks/digibyte.py(REAL_CHAIN_LENGTH = 12*60*60//15 = 2880).No runtime rewire:
redistribute.hpp/pool_monitor.hpp/share_check.hppare NOT rewired this slice — byte-identity delegation is the follow-on. Theget_delta_to_lastskip-list walk stays in the forest; only the integer guards over the already-resolved pair are lifted.KAT 7/7 green (non-circular — every expectation re-derived from the oracle min/clamp identities + DGB net constants, including a full
0..2*CHAIN_LENGTHconsistency sweep). Per-coin isolation:src/impl/dgb/only. Test in bothbuild.yml--targetarms + dirCMakeLists.txt.No self-merge — surfacing for tap on full-rollup green.